<%@ page import="xyz.vmcserver.wdibbs.model.po.ArticleType" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: 11382
  Date: 2022/6/1
  Time: 15:59
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
  ArticleType at1 = new ArticleType(1,"STU001","学生1区");
  ArticleType at2 = new ArticleType(2,"STU002","学生2区");
  ArticleType at3 = new ArticleType(3,"STU003","学生3区");
  ArticleType at4 = new ArticleType(4,"LIFE001","生活1区");
  ArticleType at5 = new ArticleType(5,"LIFE001","生活2区");
  ArticleType at6 = new ArticleType(6,"LIFE001","生活3区");
  ArticleType at7 = new ArticleType(7,"TEST001","测试1区");
  ArticleType at8 = new ArticleType(8,"TEST002","测试2区");
  ArticleType at9 = new ArticleType(9,"TEST003","测试3区");
  ArticleType at10 = new ArticleType(10,"EFF001","空分区1");
  List<ArticleType> atl = new ArrayList<>();
  atl.add(at1);
  atl.add(at2);
  atl.add(at3);
  atl.add(at4);
  atl.add(at5);
  atl.add(at6);
  atl.add(at7);
  atl.add(at8);
  atl.add(at9);
  atl.add(at10);
  pageContext.setAttribute("atl", atl);

%>
<html>
<head>
  <style>
    .col-4{
      height: 600px;
    }
    /*.b1{*/
    /*  background-color: #0dcaf0;*/

    /*}*/
    /*.b2{*/
    /*  background-color: #f00ddd;*/

    /*}*/
    /*.b3{*/
    /*  background-color: #188fa2;*/
    /*}*/
  </style>
</head>
<body>
<%--导入依赖--%>
<%--页面二级标题--%>
<jsp:include page="/WEB-INF/pages/module/head.jsp">
  <jsp:param name="title_2" value="示例页面"/>
</jsp:include>
<%--导入导航栏--%>
<jsp:include page="/WEB-INF/pages/module/navbar.jsp">
  <jsp:param name="permission" value="1"/>
</jsp:include>
<div class="container">
  <div class="row">
    <div class="col-2 b1"></div>
    <div class="col-8 b2">
      <h1 style="text-align: center">
        帖子分区管理
      </h1>
      <table class="table">
        <thead>
        <tr>
          <th scope="col">编号</th>
          <th scope="col">分区ID</th>
          <th scope="col">分区名</th>
          <th scope="col">编辑</th>
          <th scope="col">删除</th>
        </tr>
        </thead>
        <tbody>

        <c:forEach items="${pageScope.atl}" var="atli">
          <tr>
            <td>${atli.getId()}</td>
            <td>${atli.getTypeCode()}</td>
            <td>${atli.getTypeName()}</td>
            <td><input type="button" class="btn btn-primary" type="button" value="编辑"/></td>
            <td><input type="button" class="btn btn-danger" type="button" value="删除"/></td>
          </tr>
        </c:forEach>
        </tbody>
      </table>


    </div>
    <div class="col-2 b3"></div>
  </div>
</div>

</body>
</html>
